package cmd

import (
	"os"

	"github.com/spf13/cobra"
	"go.uber.org/zap"
)

var RootCmd = &cobra.Command{
	Use:   "k8s-events",
	Short: "K8S Events Collector",
	Long:  "K8S Events Collector",
	RunE: func(cmd *cobra.Command, args []string) error {
		return cmd.Help()
	},
}

func Execute() {
	if err := RootCmd.Execute(); err != nil {
		zap.L().Sugar().Errorf("Error executing root command: %s", err)
		os.Exit(-1)
	}
}
